package com.tanquandan.askbackend.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tanquandan.askbackend.dao.CourseMapper;
import com.tanquandan.askbackend.dto.R;
import com.tanquandan.askbackend.entity.Course;
import com.tanquandan.askbackend.service.ICourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class CourseService extends ServiceImpl<CourseMapper, Course> implements ICourseService{
    @Autowired
    private CourseMapper courseMapper;
    @Override
    public R<List<Course>> recommend(Long userId) {
       return R.success(courseMapper.listRecommendsByUser(userId));
    }
}
